
/**
 *   {
        field: 'createDate',
        title: '时间',
        width: 120
    }
 * @type {*[]}
 */
clos = [
    {
        field:'uid',
        title:'序号',
        sort: true,
        width: 60,
        type:'numbers',
        align:'center'
    },
    {
        field: 'customerName',
        title: '供应商',
        width: 130
    },{
        field: 'materielNum',
        title: 'SAP/QAD',
        width: 100
    },
    {
        field: 'materielName',
        title: '零件名称',
        width: 120
    },
    /*{
        field: 'unit',
        title: '计量单位',
        width: 100
    },*/
    {
        field: 'packingQuantity',
        title: '单包装',
        width: 80
    },
    /*{
       field: 'upperValue',
       title: 'max',
       width: 80
   },
   {
       field: 'lowerValue',
       title: 'min',
       width: 80
   },
  {
       field: 'username8',
       title: '是否断点',
       width: 100
   },*/
    {
        field: 'lastGeLiBalance',
        title: '上月不良结存',
        width: 115

    },{
        field: 'lastMonthBalance',
        title: '上月结存',
        width: 90,
        templet:function (row) {

            console.log(row.lastMonthBalance < 0)

            if (row.lastMonthBalance < 0) {
                return 0;
            }else {
                return row.lastMonthBalance
            }
        }
    },
    {
        field: 'thisMonthAdd',
        title: '本月累计入库',
        width: 115
    },{
        field: 'thisMonthTuiHui',
        title: '本月累计退回',
        width: 115
    },{
        field: 'thisMonthReduce',
        title: '本月累计发出',
        width: 115
    },
    {
        field: 'thisMonthReturn',
        title: '本月退库',
        width: 90
    },
    {
        field: 'thisMonthBalance',
        title: '本月结存',
        width: 90,
        templet:function (row) {

            var temp = row.thisMonthBalance + row.thisMonthTuiHui

            if (temp > 0) {
                return temp
            } else {
                return 0
            }
        }
    },
    {
        field: 'getBuLiangLeiJi',
        title: '本月累计不良',
        width: 115,

    },
    {
        field: 'getFangong',
        title: '本月累计返工',
        width: 115

    },
    {
        field: 'geLiBalance',
        title: '不良结存',
        width: 90  
    },

    {
        field: 'thisMonthBalance',
        title: '当月可用库存',
        width: 115,
        templet:function (row) {
           var temp =  (row.thisMonthBalance + row.thisMonthTuiHui - row.geLiBalance)
            if (temp > 0) {
                return temp
            } else {
                return 0
            }

        }

    },

]